NAME=aria2
VERSION=alpine
IMAGE_URL=${NAME}:${VERSION}

all: build

build:
	docker build -t ${IMAGE_URL} .

run:
	@docker run -d --name aria2-test -p 8088:8080 -v ${PWD}/data:/data aria2:alpine
	@echo "open http(s)://0.0.0.0:8088"
	@echo "token http(s)://0.0.0.0:8088/token.txt"

exec:
	@docker exec -it aria2-test /bin/sh

clean:
	@docker rm -f aria2-test

.PHONY: all build